Graphical modeling environments assist in simplifying the process of designing, simulating, and implementing graphical models for systems. A graphical model is a representation of a system through a graph containing nodes (e.g. blocks) interconnected by arcs (e.g., lines). Nodes are functional entities that perform mathematical operations, transformations and/or other operations on the data and information that is processed by the system. In some graphical modeling environments, the lines represent signals. Signals represent information, such as data, data types, timing information, and control information that connect the output and input of various nodes.
In certain graphical modeling environments, the signals have a number of attributes, such as data dimensions (i.e. signal dimensionality) and data type. Signal data can be organized into a data structure having one or more dimensions (e.g., a vector, a matrix, etc.).
After creating a model in a modeling environment, a user may be able to execute the model by commanding the modeling environment to simulate the system represented by the model. When a model executes, the output of the model may be calculated from a specified start time to a specified stop time.
As a model in a graphical modeling environment executes, signal dimensionality may need to be known so that signals can be properly processed. If signal dimensionality is allowed to vary while the model executes, the time varying information regarding signal dimensions may need to propagate along with the signal values during execution. If the dimensionality of a signal varies while the model executes, the signal is referred to as variable-size signal. It is therefore important to represent variable-sized signals in an efficient way in the generated code for the corresponding model.